///Case comparison data for Krebs and Licklider 2015
///11-29

**creation of variables not taken from other datasets
**gen govtroopspc=(govtroopwarend/1000)/tpop
**gen rebeltroopspc=(rebtroopwarend/1000)/tpop
**gen casualties=hartzell_inten/wardur

** DESCRIPTION OF VARIABLES
**hartzell_intensity - measure of intensity taken from Hartzell
**hartzell_lninten - natural log of intensity
**casualties - casualties divided by duration of the war (in months)
**rebfac - maximum number of rebel factions fighting during the war, taken from Hartzell
**tpop - total population of the state, taken from National Military Capabilities dataset (COW)
**pko - dummy variable, peacekeeping operations + pbo, taken from Hartzell
**gdppc - gdp per capita in the year of war's end, taken from Hartzell with missing data supplemented by Gleditsch (2002)
**rebtroopwarend - number of rebel troops at war's end, taken from Reed Wood, UCDP
**govtroopwarend - number of government troops at war's end, taken from WMEAT and NMC
**rebratiomax - Maximum ratio of rebel to government troops over the duration of the war, taken from Wood, Gent, and Kathman (2012)
**rebratiomin - Minimum ratio of rebel to governemnt troops over the duration of the war, taken from Wood, Gent, and Kathman (2012)
**kl - dummy variable whether case is included in Krebs & Licklider (1) or is not (0)


//Summary Statistics
summ hartzell_inten hartzell_lninten casualties wardur lnwardur rebfac tpop gdppc rebtroopwarend govtroopwarend rebratiomax rebratiomin 

summ hartzell_inten hartzell_lninten casualties wardur lnwardur rebfac tpop gdppc rebtroopwarend govtroopwarend rebratiomax rebratiomin  if kl==1

summ hartzell_inten hartzell_lninten casualties wardur lnwardur rebfac tpop gdppc rebtroopwarend govtroopwarend rebratiomax rebratiomin  if kl==0


//Difference of means tests
//testing for equal variances

robvar casualties, by(kl)
** unequal variance
ttest casualties, by(kl) unequal

robvar wardur, by(kl)
** equal variance
ttest wardur, by(kl)

robvar rebfac, by(kl)
**equal variance
ttest rebfac, by(kl)

robvar tpop, by(kl)
**equal variance
ttest tpop, by(kl)

robvar pko, by(kl)
**unequal variance
ttest pko, by(kl) unequal

robvar gdppc, by(kl)
**unequal variance
ttest gdppc, by(kl) unequal

robvar rebtroopwarend, by(kl)
**equal
ttest rebtroopwarend, by(kl)

robvar govtroopwarend, by(kl)
**unequal
ttest govtroopwarend, by(kl) unequal

robvar rebratiomax, by(kl)
**equal
ttest rebratiomax, by(kl)

robvar rebratiomin, by(kl)
**unequal
ttest rebratiomin, by(kl) unequal

robvar govtroopspc, by(kl)
**equal
ttest govtroopspc, by(kl)

robvar rebtroopspc, by(kl)
** equal
ttest rebtroopspc, by(kl)
